<template>
  <div class="ceshiBox">
    <div class="ceshiSmallBox">
      <el-tag>当前设置角色: 管理员</el-tag>
    </div>
    <div class="ceshiSel">
      <el-tree
        show-checkbox
        :data="data"
        node-key="id"
        :default-checked-keys="show"
        :props="defaultProps"
      >
      </el-tree>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
        show:[],
      data: [
        {
          id: '/home',
          label: "首页",
        },
        {
          id: '/goods',
          label: "商品",
          children: [
            {
              id: '/category',
              label: "品类管理",
            },
            {
              id: '/product',
              label: "商品管理",
            },
            {
              id: '/specAttr',
              label: "规格属性",
            },
          ],
        },
        {
          id: '/users',
          label: "用户",
          children: [
            {
              id: '/user',
              label: "用户管理",
            },
            {
              id: '/role',
              label: "权限管理",
            },
          ],
        },
        {
          id: '/orders',
          label: "订单",
          children: [
            {
              id: '/order',
              label: "订单管理",
            },
          ],
        },
      ],
      defaultProps: {
        children: "children",
        label: "label",
      },
    };
  },
};
</script>


<style lang="scss" scoped>
.ceshiBox {
  display: flex;
  flex-direction: column;
}
.ceshiSmallBox {
  display: flex;
  justify-content: center;
}
</style>